package com.itzhanshen.auth;

import com.itzhanshen.sys.feign.SysUserFeign;
import com.nineclock.common.entity.Result;
import com.nineclock.dto.SysCompanyUserDTO;
import com.nineclock.dto.SysUserDTO;
import javafx.application.Application;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.context.junit4.SpringRunner;

import java.util.List;

@SpringBootTest
@RunWith(SpringRunner.class)
public class MyTestFeign {
    @Autowired
    private SysUserFeign sysUserFeign;

    @Test
    public void queryTest() {
        SysUserDTO sysUserDTO = sysUserFeign.findUserInfo("小明").getData();
        System.out.println(sysUserDTO);
    }
    @Test
    public void queryUser() {
        List<SysCompanyUserDTO> companyUserDTOS = sysUserFeign.findCompanyUserByUserIdAndCompanyId(30L, null).getData();
        for (SysCompanyUserDTO companyUserDTO : companyUserDTOS) {
            System.out.println(companyUserDTO);
        }

    }

}
